<template>
  <Child4 ref="childRef"></Child4>  
  <!-- ref获取dom接口 -->
  <ul class="list">
    <li class="list-item" v-for="(item, index) in childRef?.list" :key="index">
      {{ item }}</li>
  </ul>
</template>

<script setup>
import { ref } from 'vue';
import Child4 from './components/Child4.vue'

const childRef=ref(null)
</script>

<style lang="scss" scoped>
</style>